<?php
/**
 * Created by PhpStorm.
 * User: Admin
 * Date: 2020-08-01
 * Time: 下午 08:38
 */
namespace Action\Page;

use Action\Common\BaseLayout;
use Model\Page;

/**
 * Class Edit
 * @property-read \Model\Page $pageModel
 * @package Action\Page
 */
class Del extends BaseLayout {
    public function main() {
        $id = $_GET['id'];
        
        if(empty($id) || !$this->pageModel->exists($id)) {
            $this->jsBackAlert('页面不存在');
        }
        
        $this->pageModel->remove($id);
        $this->jsBack();
    }
} 